home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacWT 0.9 / wt Source / texture.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-10  |  1.1 KB  |  39 lines  |  [TEXT/CWIE]

  1. /*
  2. **  MacWT -- a 3d game engine for the Macintosh
  3. **  © 1995, Bill Hayden and Nikol Software
  4. **
  5. **  On the Internet:
  6. **  bmoc1@aol.com (my personal address)
  7. **  nikolsw@grove.ufl.edu (my school address)
  8. **    MacWT anonymous FTP site: ftp.circa.ufl.edu/pub/software/ufmug/mirrors/LocalSW/Hayden/
  9. **  http://grove.ufl.edu:80/~nikolsw (my WWW page, containing MacWT info)
  10. **
  11. **  based on wt, by Chris Laurel (claurel@mr.net)
  12. **
  13. **  This program is distributed in the hope that it will be useful,
  14. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. */
  17.  
  18. /* GIF87a code from Thomas Hamren (d0hampe@dtek.chalmers.se) */
  19.  
  20. #ifndef TEXTURE_H_
  21. #define TEXTURE_H_
  22.  
  23.  
  24. typedef struct {
  25.      short        width, height;
  26.      short        log2height;
  27.      Pixel         *texels;
  28.      Pixel16    *texels16;
  29.      Boolean    opaque;
  30. } Texture;
  31.  
  32. #define TEXTURE_COLUMN(tex, col) ((tex)->texels + ((col) << (tex)->log2height))
  33. #define TEXTURE_COLUMN16(tex, col) ((tex)->texels16 + ((col) << (tex)->log2height))
  34.  
  35. extern Texture *new_texture(short width, short height);
  36. extern Texture *read_texture_file(char *filename);
  37.  
  38. #endif
  39.